﻿<UserControl x:Class="CPPEI.Coolzon.BrowserApp.MainViewControl.Header"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="51" d:DesignWidth="1366">
    <Grid>
        <Grid.Background>
            <ImageBrush ImageSource="/CPPEI.Coolzon.BrowserApp;component/Images/top.jpg"></ImageBrush>
        </Grid.Background>
        <Grid.Resources>
            <Style TargetType="TextBlock">
                <Setter Property="Foreground" Value="White" />
            </Style>
            <Style TargetType="Button">
                <Setter Property="Width" Value="47"/>
                <Setter Property="Height" Value="42"/>
            </Style>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="525"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition Width="276"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Image Source="/CPPEI.Coolzon.BrowserApp;component/Images/logo.png" Margin="20,0,0,0"/>

        <TextBlock   Grid.Column="1" x:Name="tbMessage" Text="欢迎您-890678" Margin="0,0,21,10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Foreground="Blue" Height="20" Width="521" TextAlignment="Right"/>
        <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="0,0,20,0">
            <!--<StackPanel.Background>
                <ImageBrush ImageSource="/CPPEI.Coolzon.BrowserApp;component/Images/top.jpg"></ImageBrush>
            </StackPanel.Background>-->
            <Canvas Width="170">
                <Rectangle x:Name="LogOut" Width="47" Height="42" Canvas.Left="30" Canvas.Top="5" MouseLeftButtonDown="LogOut_MouseLeftButtonDown" Cursor="Hand">
                    <Rectangle.Fill>
                        <ImageBrush ImageSource="/CPPEI.Coolzon.BrowserApp;component/Images/lout.png"/>
                    </Rectangle.Fill>
                    <Rectangle.Triggers>
                        <EventTrigger RoutedEvent="Mouse.MouseEnter">
                            <BeginStoryboard x:Name="OnLogOutMouseEnter">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(Rectangle.Fill)">
                                        <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                            <DiscreteObjectKeyFrame.Value>
                                                <ImageBrush ImageSource="/CPPEI.Coolzon.BrowserApp;component/Images/lout2.png"/>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="Mouse.MouseLeave">
                            <BeginStoryboard x:Name="OnLogOutMouseLeave">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(Rectangle.Fill)">
                                        <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                            <DiscreteObjectKeyFrame.Value>
                                                <ImageBrush ImageSource="/CPPEI.Coolzon.BrowserApp;component/Images/lout.png"/>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </Rectangle.Triggers>
                </Rectangle>
                <Rectangle x:Name="Help" Width="47" Height="42" Canvas.Left="90" Canvas.Top="5" MouseLeftButtonDown="Help_MouseLeftButtonDown" Cursor="Hand" >
                    <Rectangle.Fill>
                        <ImageBrush ImageSource="/CPPEI.Coolzon.BrowserApp;component/Images/help.png"/>
                    </Rectangle.Fill>
                    <Rectangle.Triggers>
                        <EventTrigger RoutedEvent="Mouse.MouseEnter">
                            <BeginStoryboard x:Name="OnHelpMouseEnter">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(Rectangle.Fill)">
                                        <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                            <DiscreteObjectKeyFrame.Value>
                                                <ImageBrush ImageSource="/CPPEI.Coolzon.BrowserApp;component/Images/help2.png"/>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="Mouse.MouseLeave">
                            <BeginStoryboard x:Name="OnHelpMouseLeave">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(Rectangle.Fill)">
                                        <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                            <DiscreteObjectKeyFrame.Value>
                                                <ImageBrush ImageSource="/CPPEI.Coolzon.BrowserApp;component/Images/help.png"/>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </Rectangle.Triggers>
                </Rectangle>
                <Rectangle x:Name="Exit" Width="47" Height="42" Canvas.Left="150" Canvas.Top="5" MouseLeftButtonDown="Exit_MouseLeftButtonDown" Cursor="Hand">
                    <Rectangle.Fill>
                        <ImageBrush ImageSource="/CPPEI.Coolzon.BrowserApp;component/Images/shutdown.png"/>
                    </Rectangle.Fill>
                    <Rectangle.Triggers>
                        <EventTrigger RoutedEvent="Mouse.MouseEnter">
                            <BeginStoryboard x:Name="OnExitMouseEnter">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(Rectangle.Fill)">
                                        <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                            <DiscreteObjectKeyFrame.Value>
                                                <ImageBrush ImageSource="/CPPEI.Coolzon.BrowserApp;component/Images/shutdown2.png"/>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="Mouse.MouseLeave">
                            <BeginStoryboard x:Name="OnExitMouseLeave">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(Rectangle.Fill)">
                                        <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                            <DiscreteObjectKeyFrame.Value>
                                                <ImageBrush ImageSource="/CPPEI.Coolzon.BrowserApp;component/Images/shutdown.png"/>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </Rectangle.Triggers>
                </Rectangle>
            </Canvas>
            <!--<Image Width="57" Height="59" Margin="5,0,16,0" Source="/CPPEI.Coolzon.BrowserApp;component/Images/b1.png"/>
                <Image Width="57" Height="59" Margin="20,0,16,0" Source="/CPPEI.Coolzon.BrowserApp;component/Images/b2.png"/>
            <Image Width="57" Height="59" Margin="10,0,16,0" Source="/CPPEI.Coolzon.BrowserApp;component/Images/b3.png"/>-->
        </StackPanel>
    </Grid>
</UserControl>
